<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>模拟登录过程</title>
	<script type="text/javascript">
		//存储跳转的源页面
		var backurl = document.referrer;

		// 处理中间的登录逻辑,如果成功

		//跳转
		window.location.href = backurl;
	</script>
</head>
<body>
	<a href="http://www.baidu.com">百度网</a>
</body>
</html>